#include "FuelApp.h"


//#define FUEL_OS_ANDROID 1

#if FUEL_OS_ANDROID

static const ACHAR* F_AndroidClassName = _FTA("com/ykit/ctp/yone/yoneActivity");

extern void FAppIMEI_android(jstring imei);

extern "C"
{
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeAppCreate(JNIEnv * env, jobject obj, jobject asset_mgr, jstring apk_path, jstring apk_files, jstring apk_cache)
    {
        FAppCreate_android(asset_mgr, apk_path, apk_files, apk_cache, F_AndroidClassName);
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeAppDestroy(JNIEnv * env, jobject obj)
    {
        FAppDestory_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeAppPause(JNIEnv * env, jobject obj)
    {
        FAppPause_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeAppResume(JNIEnv * env, jobject obj)
    {
        FAppResume_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeDevCreate(JNIEnv * env, jobject obj)
    {
        FAppDeviceCreate_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeDevRun(JNIEnv * env, jobject obj)
    {
        FAppDeviceRun_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeDevLost(JNIEnv * env, jobject obj)
    {
        FAppDeviceLost_android();
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeDevReset(JNIEnv * env, jobject obj,  jint width, jint height)
    {
        FAppDeviceReset_android(width, height);
    }
    JNIEXPORT jboolean JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeEventCursor(JNIEnv * env, jobject obj, jint type, jfloat x, jfloat y)
    {
        return FAppCursor_android(type, x, y);
    }
    JNIEXPORT jboolean JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeEventKey(JNIEnv * env, jobject obj, jint type, jint key)
    {
        return FAppKeyEvent_android(type, key);
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeEventInputResult(JNIEnv * env, jobject obj, jint id1, jint id2, jstring txt)
    {
        FAppInputResult_android(id1, id2, txt);
    }
    JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeEventWebJump(JNIEnv * env, jobject obj, jstring url)
    {
        FAppWebJump_android(url);
    }
	JNIEXPORT void JNICALL Java_com_ykit_ctp_yone_yoneActivity_toNativeAppIMEI(JNIEnv * env, jobject obj, jstring imei)
	{
		FAppIMEI_android(imei);
	}

};

#endif